import { NgModule } from '@angular/core'
import { SharedModule } from '@shared'

import { RoleRoutingModule } from './role-routing.module'
import { RoleListComponent } from './list/list.component'
import { RoleNewComponent } from './new/new.component'
import { RoleNewBasicInfoComponent } from './new/role-new-basic-info/role-new-basic-info.component'
import { RoleNewFunctionsComponent } from './new/role-new-functions/role-new-functions.component'
import { RoleDetailComponent } from './detail/detail.component'
import { RoleService } from './role.service'
import { RoleDataService } from './role-data.service'
import { RoleAlinterService } from './role-alinter.service'
import { RoleDetailUsersComponent } from './detail/users/users.component'
import { RoleDetailOpenFunctionComponent } from './detail/open-function/open-function.component'

const COMPONENTS = [
  RoleListComponent,
]
const COMPONENTS_NOROUNT = [
  RoleNewComponent,
  RoleDetailComponent,
  RoleDetailUsersComponent,
  RoleDetailOpenFunctionComponent,
  RoleNewBasicInfoComponent,
  RoleNewFunctionsComponent,
]

@NgModule({
  imports: [
    SharedModule,
    RoleRoutingModule
  ],
  declarations: [
    ...COMPONENTS,
    ...COMPONENTS_NOROUNT
  ],
  entryComponents: COMPONENTS_NOROUNT,
  providers: [
    { provide: RoleService, useClass: RoleAlinterService },
    RoleDataService,
  ]
})
export class RoleModule { }
